package ar.edu.utn.frgp.Banco;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import ar.edu.utn.frgp.Banco.model.Cliente;
import ar.edu.utn.frgp.Banco.service.IRecursoService;

public class App 
{
    public static void main( String[] args )
    {
    	
    	String[] contexto = new String[] {"hibernate-spring.xml", "daos.xml", "services.xml"};
    	ApplicationContext ctx = new ClassPathXmlApplicationContext(contexto);
    	
    	IRecursoService service = (IRecursoService) ctx.getBean("recursoService");
    	
    	List<Cliente> clientes = service.getClientes();
    	
    	for (Cliente c: clientes)
    		System.out.println(c.toString());
    	
    }
}
